from flask import Flask
import sqlhelper

app = Flask(__name__)


@app.route('/login')
def login():
    result = sqlhelper.fetchone('select * from user where username = %s', 'wang123')
    print(result)
    return 'xxx'


@app.route('/index')
def index():
    result = sqlhelper.fetchall('select * from user')
    print(result)
    return 'xxx'


if __name__ == '__main__':
    app.run()